// 引入React 引入路由模块
import React from "react";
import { useRoutes } from "react-router-dom";

// 引入页面
import Login from "../views/login/login";
import Home from "../views/home/home";

// 创建路由
export default function Router() {
  const routes = [
    { path: "/", element: <Login /> },
    { path: "/home", element: <Home /> },
  ];

  return useRoutes(routes);
}
